<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ip
 *
 * @author root
 */
class ip {

    public function VisitorIP() {
        if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
            $TheIp = $_SERVER['HTTP_X_FORWARDED_FOR'];
        else
            $TheIp = $_SERVER['REMOTE_ADDR'];

        return trim($TheIp);
    }

}

?>
